From: Aaron Schulz Date: Fri, 17 Jul 2015 20:28:48 +0000 (-0700) Subject: Avoid using trigger_error() in addMissingMetadata() X-Git-Tag: 1.31.0-rc.0~10731 X-Git-Url: http://git.cyclocoop.org/%27%20.%20%24prefix%20.%20Wiki::transformTitleToURI%28%24matches%5B1%5D%29%20.%20%27?a=commitdiff_plain;h=83a9ac3ee8e949ff51bd3e52a097453f89955226;p=lhc%2Fweb%2Fwiklou.git Avoid using trigger_error() in addMissingMetadata() * Just use the normal swift log instead Bug: T105810 Change-Id: Ifa463e6298a1b57ab6a8d92f9defc744619d9fb6 --- diff --git a/includes/filebackend/SwiftFileBackend.php b/includes/filebackend/SwiftFileBackend.php index 9bae2ae6c8..2ccafe4b1d 100644 --- a/includes/filebackend/SwiftFileBackend.php +++ b/includes/filebackend/SwiftFileBackend.php @@ -666,8 +666,9 @@ class SwiftFileBackend extends FileBackendStore { return $objHdrs; // nothing to do } + /** @noinspection PhpUnusedLocalVariableInspection */ $ps = Profiler::instance()->scopedProfileIn( __METHOD__ . "-{$this->name}" ); - trigger_error( "$path was not stored with SHA-1 metadata.", E_USER_WARNING ); + wfDebugLog( 'SwiftBackend', __METHOD__ . ": $path was not stored with SHA-1 metadata." ); $auth = $this->getAuthentication(); if ( !$auth ) { @@ -677,6 +678,7 @@ class SwiftFileBackend extends FileBackendStore { } $status = Status::newGood(); + /** @noinspection PhpUnusedLocalVariableInspection */ $scopeLockS = $this->getScopedFileLocks( array( $path ), LockManager::LOCK_UW, $status ); if ( $status->isOK() ) { $tmpFile = $this->getLocalCopy( array( 'src' => $path, 'latest' => 1 ) ); @@ -696,7 +698,8 @@ class SwiftFileBackend extends FileBackendStore { } } } - trigger_error( "Unable to set SHA-1 metadata for $path", E_USER_WARNING ); + + wfDebugLog( 'SwiftBackend', __METHOD__ . ": unable to set SHA-1 metadata for $path" ); $objHdrs['x-object-meta-sha1base36'] = false; return $objHdrs; // failed